package StudyCode.Arrray;

import java.util.Arrays;

/**
 * @author lixiaoyao
 */
public class ArrayPrint {

	public static void main(String[] args) {

		int[] arrays1 = new int[]{1, 2, 3, 4};
		// The first method
		System.out.println("The first method");
		for (int i = 0; i < arrays1.length; i++) {
			System.out.println(arrays1[i]);
		}

		// The second method
		System.out.println("The second method");
		System.out.println(Arrays.toString(arrays1));

		// The third method is for multidimensional arrays
		System.out.println("The third method is for multidimensional arrays");
		int[][] arrays2 = new int[][]{{1, 2}, {3, 4}};
		System.out.println(Arrays.deepToString(arrays2));
	}
}
